# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=twinkle
pkgver=1.10.3
pkgrel=2
pkgdesc="SIP softphone"
url="https://github.com/LubosD/twinkle"
arch="all"
license="GPL-2.0-or-later"
makedepends="
	alsa-lib-dev
	bison
	ccrtp-dev
	cmake
	commoncpp-dev
	file-dev
	flex
	libsndfile-dev
	libxml2-dev
	qt5-qtbase-dev
	qt5-qtdeclarative-dev
	qt5-qttools-dev
	readline-dev
	samurai
	speex-dev
	speexdsp-dev
"
subpackages="$pkgname-doc"
source="https://github.com/LubosD/twinkle/archive/refs/tags/v$pkgver/twinkle-$pkgver.tar.gz
	glibc.patch
	"
options="!check" # no tests provided

build() {
	cmake -G Ninja -B build \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DWITH_SPEEX=ON
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
7b70a346e6d3f1dd08c1d019dd671da3cb3539815d8a14de7268b2bf43fc0b632834e00d3b63823b1338472a1b91f727a479e5381da8b1076327b112c8a9bea2  twinkle-1.10.3.tar.gz
c537a0a83725435e60d436987713cd24f3e1a96ac0de5990a0fdeaeff8535baddc58ab567a217b9947938f6aede03d827de4ed6ffbdb28b15eb33390775700d8  glibc.patch
"
